package com.loong.data.model;

import lombok.*;
import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
import java.util.UUID;

/**
 *
 */
@Setter
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Document(indexName = "user",type="user",replicas = 0)
public class UserModel {

    @Id
    private Long id;

    @Field(type = FieldType.Keyword)
    private Long userId;

    @Field(fielddata = true)
    private String username;

    @Field
    private String mobile;

    @Field
    private String areaCode;

    @Field
    private String avatar;

    @Field
    private String country;

    @Field
    private Integer sex;

    @Field
    private Date birthday;

    @Field
    private String email;

    @Field
    private String registerIp;

    @Field
    private Date registerTime;

    @Field
    private Date lastLoginTime;

    @Field
    private String loginIp;

    @Field
    private Integer status;
}
